<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------

namespace Admin\Controller;


/**
 * 前台首页控制器
 * 主要获取首页聚合数据
 */
class CustomerluruController extends AdminController {
    
	//展位管理
	public function customer_luru(){
        $map = array();
        $map  = array('status' => 1);
        if(isset($_GET['name'])){
            $map['name']    =   array('like', '%'.(string)I('name').'%');
        }
		
		$lists = $this->lists('Customer_info',$map,'uid asc');
		//$lists  = D('Customer_info')->where($map)->order('uid asc')->select();//查询语句
    	$this->assign('customerluru',$lists);
	 
	    $this->display();
	}

	//展位审核
    public function booth_review(){
		$map=array();
		$map=array('status'=>1);
		if(isset($_GET['name'])){
			$map['name']=array('like','%'.(string)I('name').'%');
		}
		$list=$this->lists('Customer_info',$map,'uid asc');
		$this->assign('boothreview',$list);
	    $this->display();
	}
	//删除
	 public function del(){
        $id = array_unique((array)I('uid',0));

        if ( empty($id) ) {
            $this->error('请选择要操作的数据!');
        }

        $map = array('uid' => array('in', $id) );
        if(M('Customer_info')->where($map)->delete()){
            S('DB_CONFIG_DATA',null);
            //记录行为
            action_log('update_config','Customer_info',$id,UID);
            $this->success('删除成功');
        } else {
            $this->error('删除失败！');
        }
    }


}




?>